const { createProxyMiddleware } = require('http-proxy-middleware');

module.exports = function (app) {
  // 可以配多个
  app.use(
    '/maoYan',
    createProxyMiddleware({
      target: 'https://i.maoyan.com',
      changeOrigin: true,
      ws: true,
      pathRewrite: {
        '^/maoYan': '',
      },
    })
  );
};
